import 'package:flutter/material.dart';
import 'package:flutter_demo/pages/profile/components/skill_item.dart';

class SkillList extends StatelessWidget {
  const SkillList({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.only(bottom: 24, left: 24, right: 24),
      child: Column(
        children: [
          Container(
            alignment: Alignment.center,
            padding: const EdgeInsets.all(12),
            child: Stack(
              alignment: Alignment.center,
              children: [
                // 一条高度为2，宽度为200的黑线
                Container(
                  width: 100,
                  decoration: const BoxDecoration(
                    // 线条颜色
                    color: Colors.black,

                    // 线条宽度
                    border: Border(
                      bottom: BorderSide(
                        width: 1,
                        color: Colors.black,
                      ),
                    ),
                  ),
                ),
                IntrinsicWidth(
                  child: Container(
                    color: Colors.white,
                    padding: const EdgeInsets.all(8),
                    child: const Text('我的技能'),
                  ),
                )
              ],
            ),
          ),
          ...List.generate(
            8,
            (index) {
              return [
                const SkillItem(),
                const SizedBox(height: 10),
              ];
            },
          ).expand((item) => item),
        ],
      ),
    );
  }
}
